package com.myz.rabbitmq.blueCup;

import java.util.*;

public class Topic_284 {
    public static void main(String[] args){
        ArrayList<ArrayList<Integer>> list = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        for (int i=0;i<row;i++){
            ArrayList<Integer> li = new ArrayList<>();
            for (int j=0;j<=i;j++) {
                if (j==i) {
                    li.add(1);
                    System.out.println(1);
                }else if(j==0){
                    li.add(1);
                    System.out.print(1+" ");
                }else {
                    li.add(list.get(i-1).get(j-1)+list.get(i-1).get(j));
                    System.out.print(list.get(i-1).get(j-1)+list.get(i-1).get(j));
                    System.out.print(" ");
                }
            }
            list.add(li);
        }
    }
}